package co.yixiang.modules.quartz.task;

import co.yixiang.modules.shop.service.YxInvestOrderService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


/**认购订单到期状态修改定时器
 * @author frq
 * @date 2020-06-22
 */
@Slf4j
@Component
public class SubscriptionExpiresTimer {
    @Autowired
    private YxInvestOrderService yxInvestOrderService;

    public void run(){
        //获取到期的投资
       List<Integer> list=yxInvestOrderService.findByListOrderId();
        for (Integer id:list) {
            yxInvestOrderService.updateInvestStatus(id,4);
        }
    }
}
